package com.adou.second.file;

import java.io.FileInputStream;
import java.io.FileOutputStream;

/**
 * 拷贝图片
 * @author Administrator
 *
 */
public class CopyPic {

	public static void main(String[] args) throws Exception {
		FileInputStream fis = new FileInputStream("fos\\meinv.jpg");
		FileOutputStream fos = new FileOutputStream("fos\\pic\\meinu.jpg");
		byte[] byt = new byte[1024];//1024及其整数倍
		int len;
		while((len = fis.read(byt)) != -1) {
			fos.write(byt, 0, len);
		}
		
		fis.close();
		fos.close();
	}

}
